﻿#ifndef DOCTORUI_H
#define DOCTORUI_H

#include <QMainWindow>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QMessageBox>
#include <QSqlTableModel>

namespace Ui {
class doctorUI;
}

class doctorUI : public QMainWindow
{
    Q_OBJECT

public:
    explicit doctorUI(QString account,QSqlDatabase* db,QWidget *parent = nullptr);
    ~doctorUI();

private slots:
    void on_pushButton_clicked();

    void on_pushButton_5_clicked();

    void on_actReserve_triggered();

    void on_actChange_triggered();

    void on_actCase_triggered();

    void on_actMain_triggered();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void on_actQuit_triggered();

    void on_btnResetDoc_clicked();

    void on_btnSubmitChangeDoc_clicked();

    void on_tvServe_doubleClicked(const QModelIndex &index);

    void on_btnCancel_clicked();

    void on_btnSubmit_clicked();

private:
    Ui::doctorUI *ui;

    QSqlDatabase m_db;//保存数据库连接
    QString m_account;//保存医生账号

    QSqlTableModel* m_reserveModel;//预约数据模型
    QSqlTableModel* m_caseModel;//病例数据模型

    void iniUI();//初始化程序
};

#endif // DOCTORUI_H
